package com.atguigu.day28.work;

import org.junit.Test;

import java.time.LocalDateTime;
import java.util.Date;

public class Work1 {
    public static void main(String[] args) {
        showLongTime(()->System.out.println(System.currentTimeMillis()));
        showLongTime(()->System.out.println(new Date()));
        showLongTime(()->System.out.println(LocalDateTime.now()));
    }
    public static void showLongTime(CurrentTimePrinter timePrinter){
        timePrinter.printCurrentTime();
    }
}
